<template>
  <div class="container">
    <Category title="美食">
      <!-- 使用具名插槽：在具体结构标签上加上'slot'属性（根据所使用组件下插槽的具体标识名称（'name'属性）去填充结构） -->
      <img slot="center" src="./assets/food.jpeg" alt=""/>
      <div class="footer" slot="footer">
        <a href="#">广西美食</a>
        <a href="#">湖南美食</a>
        <a href="#">更多美食</a>
      </div>
    </Category>

    <Category title="游戏">
      <ul slot="center">
        <li v-for="(game,index) in games" :key="index">
          {{game}}
        </li>
      </ul>
      <div class="footer" slot="footer">
        <a href="#">单机游戏</a>
        <a href="#">网络游戏</a>
        <a href="#">射击游戏</a>
      </div>
    </Category>

    <Category title="电影">
      <video slot="center" controls src="http://clips.vorwaerts-gmbh.de/big_duck_bunny.mp4"></video>
      <template slot="footer">
        <div class="footer">
          <a href="#">经典</a>
          <a href="#">热门</a>
          <a href="#">推荐</a>
        </div>
        <h4>欢迎前来观影</h4>
      </template>
      <!-- <div class="footer" slot="footer">
        <a href="#">经典</a>
        <a href="#">热门</a>
        <a href="#">推荐</a>
      </div>
      <h4 slot="footer">欢迎前来观影</h4> -->
    </Category>
  </div>
</template>

<script>
  //
  import Category from './components/Category'

  export default {
      name:'App',
      components:{Category},
      data() {
        return {
          foods:['火锅', '烧烤', '小龙虾'],
          games:['红色警戒', '穿越火线', '劲舞团'],
          films:['《教父》', '《拆弹专家》', '《你好，李焕英》']
        }
      }
  }
</script>

<style scoped>
  .container{
    display: flex;
    justify-content: space-around;
  }
</style>